﻿using System;
using System.ComponentModel.DataAnnotations;
using LERP.Domain;
using LERP.Domain.Enums;

namespace LERP.Web.Controllers.ViewModels.CustomerViewModels
{
    public class CustomerViewModel 
    {

        [Display(Name = "客户编号")] 
        public int Id{get; set; }


        [Display(Name = "父级客户编号")]
        public int ParentId { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary> 
        [Display(Name = "客户名称")]
        [StringLength(64, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string Name { get; set; }
        /// <summary>
        /// 客户级别
        /// </summary> 
        [Display(Name = "客户级别")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual CustomerLevel Level { get; set; } 

         

        /// <summary>
        /// 联系人名称
        /// </summary> 
        [Display(Name = "联系人名称")]
        [StringLength(64, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Linkman { get; set; }

        /// <summary>
        /// 手机号
        /// </summary> 
        [Display(Name = "手机号")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Mobile { get; set; } 
         
         
        /// <summary>
        /// 状态
        /// </summary>
        [Display(Name = "状态")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual DataStatus Status { get; set; }
    }
}